import { createApp, provide } from 'vue'
import './style.css'
import './styles/index.scss'
import App from './App.vue'

//ElementPlus(顶不住)
import ElementPlus from 'element-plus';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css';
import { ElMessage } from 'element-plus'

//vueRouter
import router from './router';

//vueCookies
import cookies from 'vue-cookies'
//echarts
import ECharts from 'vue-echarts'
import "echarts"

//vuex
import store from './store';

//loading的样式
import '../src/styles/loading.css'

const app = createApp(App)


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(ElementPlus)
app.use(router)
app.use(store)
app.provide('$cookies', cookies)
// app.config.globalProperties.$cookies = cookies;
app.provide('$message', ElMessage)
// app.use(cookies)
app.component('ECharts', ECharts)

app.mount('#app')
